feat(toolchain): centralize S-CORE toolchain configurations and compiler warning policies - #180
Conversation
- Fix copy-paste typo in score_toolchain.bazelrc where score-autosd-aarch64 was mistakenly used under the x86_64 target configuration. - Add score_qcc_aarch64_toolchain_pkg to QNX use_repo block to provide the ARM64 QNX target sysroot package centrally. - Add standard GCC Linux aarch64-linux toolchain declaration and standard score-linux-aarch64 configuration profile.
- Declare 'score_rules_imagefs' centrally in MODULE.bazel under QNX Toolchains block. - Define 'score_qnx_x86_64_ifs_toolchain' and 'score_qnx_aarch64_ifs_toolchain' centrally to prevent downstream dependency resolution issues when leveraging 'score_toolchain.bazelrc'. - Format workspace BUILD files using Buildifier. - Update MODULE.bazel.lock transitive dependency map.
- Update sdp_version to "8.0.4" for QNX toolchains in MODULE.bazel. - Update MODULE.bazel.lock transitive dependency map.
… support - Declare score_cpp_policies as dev dependency in MODULE.bazel. - Define compiler-warning features from score_cpp_policies and inject them into standard Linux GCC and QNX QCC toolchains. - Add target configuration alias for CPU:x86-64|OS:Linux to .bazelrc, referencing score-linux-x86_64 centrally. Signed-off-by: Srinivasu K <srinivasu.kandukuri@in.bosch.com>
…zelrc Add --cxxopt=-Wno-error=redundant-decls to our common compiler flags. This prevents third-party headers/compilers (such as flatbuffers' grpc generator) from breaking our builds with unused redundant declarations under the new score_cpp_policies warnings. Signed-off-by: Srinivasu K <srinivasu.kandukuri@in.bosch.com>
…tadata Update lockfile with resolved dependency and toolchain registry changes, including aspect_rules_lint, rules_cc, and rules_nodejs. Signed-off-by: Srinivasu K <srinivasu.kandukuri@in.bosch.com>
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
…figuration - Resolve conflicts in: - BUILD - MODULE.bazel - MODULE.bazel.lock - score/component_example/BUILD Signed-off-by: Srinivasu K <srinivasu.kandukuri@in.bosch.com>
|
Documentation preview for this pull request is available at: |
| build:_score_common --cxxopt=-Wno-error=mismatched-new-delete | ||
| build:_score_common --cxxopt=-Wno-error=redundant-decls | ||
| build:_score_common --cxxopt=-Wno-error=stringop-overflow | ||
| build:_score_common --host_cxxopt=-Wno-error=mismatched-new-delete | ||
| build:_score_common --host_cxxopt=-Wno-error=redundant-decls | ||
| build:_score_common --host_cxxopt=-Wno-error=stringop-overflow |
There was a problem hiding this comment.
Dont these belong to policies? I'm not sure how, but somehow.
@nradakovic
There was a problem hiding this comment.
Well we do not define these particular set of flag.
But this is not for target code. It's for host execution tools.
There was a problem hiding this comment.
First two are target flags. But regardless, do we do that here or in cpp policies?
There was a problem hiding this comment.
If this is something that we want to have by default for all modules, then in cpp policies. Not here.
There was a problem hiding this comment.
this is the default for all modules if we sync it 😆
--> don't add the 5 new lines here. Content wise I'm not even sure they should be centralized
There was a problem hiding this comment.
lets exclude these for now from this PR
| # Target configuration for CPU:x86-64|OS:Linux build (leveraging central configuration) | ||
| build:x86_64-linux --config=score-linux-x86_64 |
There was a problem hiding this comment.
Is that an alias? Then no. We should not provide the same thing under multiple names.
Description
This PR centralizes, configures, and standardizes the Eclipse S-CORE Baselibs toolchain configurations and compiler warning policies across the workspace.
Key Changes:
S-CORE Compiler Warning Policies:
score_cpp_policiescentrally as a development dependency inMODULE.bazel.score_cpp_policiesand injected them into the standard Linux GCC and QNX QCC toolchains.redundant-declscompiler check to warning-only via--cxxopt=-Wno-error=redundant-declsinscore_toolchain.bazelrcto prevent compilation failures with third-party headers (such as flatbuffers' grpc generator).QNX SDP and IFS Toolchain Support:
8.0.4for QNX toolchains inMODULE.bazel.score_qnx_x86_64_ifs_toolchainandscore_qnx_aarch64_ifs_toolchain) under the QNX Toolchains block to resolve downstream dependency issues.Multi-Architecture and CPU Configurations:
aarch64-linuxtoolchain declarations and target configuration profiles.score_qcc_aarch64_toolchain_pkgto QNX use_repo block to provide ARM64 sysroot support centrally.x86_64-linuxtarget configuration alias mapping toscore-linux-x86_64in.bazelrc.score_toolchain.bazelrcunder QNX configurations.Lockfile & Bzlmod Resolution:
MODULE.bazel.locktransitive dependency map with all metadata upgrades (including updates foraspect_rules_lint,rules_cc,rules_nodejs, etc.).